package com.lxy.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
@Controller
@RequestMapping("/bbb")

public class TestController {

    @RequestMapping("/hello")
    public String helloWorld(HttpServletRequest request){

        request.setAttribute("username","哈哈哈");
        request.setAttribute("age",15);
        return "index";
    }
}
